exports.data = {
  json: {
    kind: "Snippet",
    body: ['"t-input": "tdesign-miniprogram/input/input",'],
    detail: "Field 输入框",
    documentation: `在app.json或index.json中引入组件`,
  },
  wxml: {
    kind: "Snippet",
    body: ['<t-input value="{{ ${1:value} }}"${2}>${3}<t-input>'],
    detail: "Field 输入框",
    documentation: "用户可以在文本框内输入或编辑文字。",
    attrs: [
      {
        kind: "Field",
        body: ["name="],
        detail: "name",
        documentation: "在表单内提交时的标识符",
        vals: null,
      },
      {
        kind: "Field",
        body: ["align="],
        detail: "align",
        documentation:
          "文本内容位置，居左/居中/居右。可选项：left/center/right",
        vals: {
          kind: "Value",
          body: ["left", "center", "right"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["layout="],
        detail: "layout",
        documentation: "标题输入框布局方式。可选项：vertical/horizontal",
        vals: {
          kind: "Value",
          body: ["vertical", "horizontal"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["borderless"],
        detail: "borderless",
        documentation: "是否开启无边框模式",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["show-confirm-bar="],
        detail: "show-confirm-bar",
        documentation: "是否显示键盘上方带有”完成“按钮那一栏",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["disable-default-padding"],
        detail: "disable-default-padding",
        documentation: "是否去掉 iOS 下的默认内边距",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["clearable"],
        detail: "clearable",
        documentation: "是否启用清除控件",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["clear-trigger="],
        detail: "clear-trigger",
        documentation:
          "显示清除图标的时机，always 表示输入框不为空时展示，focus 表示输入框聚焦且不为空时展示",
        vals: {
          kind: "Value",
          body: ["always", "focus"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["disabled"],
        detail: "disabled",
        documentation: "是否禁用输入框",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["format"],
        detail: "format",
        documentation:
          "【开发中】指定输入框展示值的格式。TS Function 类型：InputFormatType `type InputFormatType = (value: InputValue) => number",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["label="],
        detail: "label",
        documentation: "输入框左侧文本",
        vals: null,
      },
      {
        kind: "Field",
        body: ["maxcharacter="],
        detail: "maxcharacter",
        documentation:
          "用户最多可以输入的字符个数，一个中文汉字表示两个字符长度。maxcharacter 和 maxlength 二选一使用",
        vals: null,
      },
      {
        kind: "Field",
        body: ["maxlength="],
        detail: "maxlength",
        documentation:
          "用户最多可以输入的文本长度，一个中文等于一个计数长度。默认为 -1，不限制输入长度。maxcharacter 和 maxlength 二选一使用",
        vals: null,
      },
      {
        kind: "Field",
        body: ["placeholder="],
        detail: "placeholder",
        documentation: "输入框为空时占位符",
        vals: null,
      },
      {
        kind: "Field",
        body: ["size="],
        detail: "size",
        documentation:
          "【已废弃】输入框尺寸。可选项：small/medium。TS 类型：medium| small",
        vals: {
          kind: "Value",
          body: ["medium", "small"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["status="],
        detail: "status",
        documentation: "输入框状态。可选项： success/warning/error",
        vals: {
          kind: "Value",
          body: ["success", "warning", "error"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["suffix="],
        detail: "suffix",
        documentation: "后置图标前的后置内容 String / Slot",
        vals: {
          kind: "Value",
          body: ["success", "warning", "error"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["tips="],
        detail: "tips",
        documentation:
          "输入框下方提示文本，会根据不同的 status 呈现不同的样式 String / Slot",
        vals: null,
      },
      {
        kind: "Field",
        body: ["value="],
        detail: "value",
        documentation: "当前输入的值",
        vals: null,
      },
      {
        kind: "Field",
        body: ["default-value="],
        detail: "default-value",
        documentation: "输入框的值。非受控属性",
        vals: null,
      },
      {
        kind: "Field",
        body: ["type="],
        detail: "type",
        documentation:
          "输入框类型。可选项：text/number/idcard/digit/safe-password/password/nickname",
        vals: {
          kind: "Value",
          body: [
            "text",
            "number",
            "idcard",
            "safe-password/",
            "digit",
            "password",
            "nickname",
          ],
          detail: "",
          documentation: "",
        },
      },

      {
        kind: "Field",
        body: ["focus="],
        detail: "focus",
        documentation: "获取焦点",
        vals: null,
      },
      {
        kind: "Field",
        body: ["readonly"],
        detail: "readonly",
        documentation: "是否只读",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["required="],
        detail: "required",
        documentation: "是否显示表单必填星号",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["password"],
        detail: "password",
        documentation:
          "是否是密码类型（已废弃，请更为使用 type 指定输入框类型）",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },

      {
        kind: "Field",
        body: ["placeholder-style="],
        detail: "placeholder-style",
        documentation: "指定 placeholder 的样式",
        vals: null,
      },
      {
        kind: "Field",
        body: ["placeholder-class="],
        detail: "placeholder-class",
        documentation: "指定 placeholder 的样式",
        vals: null,
      },
      {
        kind: "Field",
        body: ["error-message="],
        detail: "error-message",
        documentation:
          "已废弃。错误提示文本，值为空不显示（废弃属性，如果需要，请更为使用 status 和 tips）",
        vals: null,
      },
      {
        kind: "Field",
        body: ["prefix-icon="],
        detail: "prefix-icon",
        documentation:
          "组件前置图标。值为字符串表示图标名称，值为 Object 类型，表示透传至 icon。",
        vals: null,
      },
      {
        kind: "Field",
        body: ["suffix-icon="],
        detail: "suffix-icon",
        documentation:
          "后置文本内容。值为字符串表示图标名称，值为 Object 类型，表示透传至 icon。",
        vals: null,
      },
      {
        kind: "Field",
        body: ["confirm-type="],
        detail: "confirm-type",
        documentation: "设置键盘右下角按钮的文字，仅在 type='text' 时生效",
        vals: {
          kind: "Value",
          body: ["done", "go", "next", "search", "send"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["confirm-hold"],
        detail: "confirm-hold",
        documentation:
          "点击键盘右下角按钮时是否保持键盘不收起，在 type='textarea' 时无效",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["hold-keyboard"],
        detail: "hold-keyboard",
        documentation: "focus 时，点击页面的时候不收起键盘",
        vals: null,
      },
      {
        kind: "Field",
        body: ["safe-password-cert-path"],
        detail: "safe-password-cert-path",
        documentation: "安全键盘加密公钥的路径，只支持包内路径",
        vals: null,
      },
      {
        kind: "Field",
        body: ["safe-password-length"],
        detail: "safe-password-length",
        documentation: "安全键盘输入密码长度",
        vals: null,
      },
      {
        kind: "Field",
        body: ["safe-password-time-stamp"],
        detail: "safe-password-time-stamp",
        documentation: "安全键盘加密时间戳",
        vals: null,
      },
      {
        kind: "Field",
        body: ["cursor-spacing="],
        detail: "cursor-spacing",
        documentation: "输入框聚焦时底部与键盘的距离",
        vals: null,
      },
      {
        kind: "Field",
        body: ["adjust-position="],
        detail: "adjust-position",
        documentation: "键盘弹起时，是否自动上推页面",
        vals: {
          kind: "Value",
          body: ["true", "false"],
          detail: "",
          documentation: "",
        },
      },
      {
        kind: "Field",
        body: ["selection-start="],
        detail: "selection-start",
        documentation:
          "光标起始位置，自动聚集时有效，需与 selection-end 搭配使用",
        vals: null,
      },
      {
        kind: "Field",
        body: ["selection-end="],
        detail: "selection-end",
        documentation:
          "光标结束位置，自动聚集时有效，需与 selection-start 搭配使用",
        vals: null,
      },
      {
        kind: "Field",
        body: ["auto-focus="],
        detail: "auto-focus",
        documentation: "(即将废弃，请直接使用 focus )自动聚焦，拉起键盘",
        vals: null,
      },
      {
        kind: "Field",
        body: ["focus"],
        detail: "focus",
        documentation: "获取焦点",
        vals: null,
      },
      {
        kind: "Field",
        body: ["cursor="],
        detail: "cursor",
        documentation: "指定 focus 时的光标位置",
        vals: null,
      },

      {
        kind: "Field",
        body: ["always-embed="],
        detail: "always-embed",
        documentation:
          "强制 input 处于同层状态，默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效)",
        vals: null,
      },
      /**
         * Events
          事件	说明	回调参数
          bind:input	输入内容时触发	event.detail: 当前输入值; 在 extra-event-params 为 true 时为 InputDetail
          bind:change	输入内容时触发	event.detail: 当前输入值; 在 extra-event-params 为 true 时为 InputDetail
          bind:confirm	点击完成按钮时触发	event.detail: 当前输入值
          bind:click-icon	点击尾部图标时触发	-
          bind:focus	输入框聚焦时触发	event.detail.value: 当前输入值;
          event.detail.height: 键盘高度
          bind:blur	输入框失焦时触发	event.detail.value: 当前输入值;
          event.detail.cursor: 游标位置(如果 type 不为 textarea，值为 0)
          bind:clear	点击清空控件时触发	-
          bind:click-input	点击输入区域时触发	-
          bind:linechange	输入框行数变化时调用，只对 textarea 有效	event.detail = { height: 0, heightRpx: 0, lineCount: 0 }
          bind:keyboardheightchange	键盘高度发生变化的时候触发此事件	event.detail = { height: height, duration: duration }
         */
      {
        kind: "Event",
        body: ["bind:enter="],
        detail: "bind:enter",
        documentation: "回车键按下时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:change="],
        detail: "bind:change",
        documentation: "输入内容时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:confirm="],
        detail: "bind:confirm",
        documentation: "点击完成按钮时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:click-icon="],
        detail: "bind:click-icon",
        documentation: "点击尾部图标时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:focus="],
        detail: "bind:focus",
        documentation: "输入框聚焦时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:blur="],
        detail: "bind:blur",
        documentation: "输入框失焦时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:clear="],
        detail: "bind:clear",
        documentation: "点击清空控件时触发",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:nicknamereview="],
        detail: "bind:nicknamereview",
        documentation: "输入框行数变化时调用，只对 textarea 有效",
        vals: null,
      },
      {
        kind: "Event",
        body: ["bind:keyboardheightchange="],
        detail: "bind:keyboardheightchange",
        documentation: "键盘高度发生变化的时候触发此事件",
        vals: null,
      },

      //css
      {
        kind: "Field",
        body: ["t-class="],
        detail: "t-class",
        documentation: "根节点样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-label="],
        detail: "t-class-label",
        documentation: "标题样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-input="],
        detail: "t-class-input",
        documentation: "input样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-clearable="],
        detail: "t-class-clearable",
        documentation: "clearable样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-suffix="],
        detail: "t-class-suffix",
        documentation: "悬停样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-prefix-icon="],
        detail: "t-class-prefix-icon",
        documentation: "前置图标样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-suffix-icon="],
        detail: "t-class-suffix-icon",
        documentation: "后置图标样式类",
        vals: null,
      },
      {
        kind: "Field",
        body: ["t-class-tips="],
        detail: "t-class-tips",
        documentation: "提示样式类",
        vals: null,
      },
    ],
    slot: {
      kind: "Value",
      body: ["label", "suffix-icon", "prefix-icon", "suffix", "tips"],
      detail: "Field 输入框 Slot",
      documentation: `
        label	自定义输入框标签，如果设置了label属性则不生效
        left-icon	自定义输入框头部图标
        right-icon	自定义输入框尾部图标
        button	自定义输入框尾部按钮
        input	自定义输入框，使用此插槽后，与输入框相关的属性和事件将失效
        `,
      vals: null,
    },
  },
};
